/*
 * 
 * v1.2 by tonydon
 */
package cn.txdnet.txcms.mapper;

import cn.txdnet.txcms.domain.Infobase;
import cn.txdnet.txcms.query.InfobaseQuery;
import cn.txdnet.txcms.query.ViewInfoQuery;
import java.util.List;
import java.util.Map;

/**
 *
 * @author txdnet
 */
public interface InfobaseMapper {

    int insertInfobase(Infobase info);

    int countByFactor(InfobaseQuery infobaseQuery);

    int deleteInfobase(Map m);

    int updatePubstate(Map m);

    int updateCmtstate(Map m);

    int updateTFlag(Map m);

    int updateTColor(Map m);

    int updatePubTime(Map m);

    int updateEndTime(Map m);

    int updateWeight(Map m);

    int updateChannelAndCatalog(Map m);

    List<Map> listByFactor(InfobaseQuery infobaseQuery);

    int queryMaxWeight();

    Infobase queryInfobaseForEdit(long infoid);

    int updateInfobase(Infobase info);

    // view
    Infobase queryInfobaseForView(ViewInfoQuery viewInfoQuery);

    int increaseHitNum(long infoid);
    
    List<Infobase> listByFactorForView(ViewInfoQuery viewInfoQuery);
    
    List<?> listByTagsForView(ViewInfoQuery viewInfoQuery);
}
